This repository was archived by the owner on Sep 8, 2025. It is now read-only.
fix issues running component-async-tests under miri#217
Merged
Conversation
Joel and I went down a deep rabbit hole today trying to figure out what's going on with a new code pattern which was being flagged as violating stacked borrows. At the end of the day I'm honestly not 100% sure what this doing or how to explain all the behavior we were seeing, but this seems to be basically equivalent and we're otherwise able to get a bit further so I figured I'd commit this. Along the way I updated the preexisting `table-intrinsics` test to correctly use the table it was supposed to be using instead of using the previous table by accident.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
In my previous commit, I had missed making a few test suites miri-compatible. In addition, some of the suites (e.g. `round_trip`) run each test multiple times using different host APIs, which is intolerably slow on miri, so we now only use one call style per test when miri is enabled. Relatedly, we now build the test programs using `--release` when the `MIRI_TEST_CWASM_DIR` environment variable is set. Finally, miri's willingness to allocate `[u8]` arrays which are _not_ 4-byte aligned exposed an issue in `error_context_new`, which I've fixed. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In my previous commit, I had missed making a few test suites miri-compatible. In
addition, some of the suites (e.g.
round_trip) run each test multiple timesusing different host APIs, which is intolerably slow on miri, so we now only use
one call style per test when miri is enabled. Relatedly, we now build the test
programs using
--releasewhen theMIRI_TEST_CWASM_DIRenvironment variableis set.
Finally, miri's willingness to allocate
[u8]arrays which are not 4-bytealigned exposed an issue in
error_context_new, which I've fixed.Note that this cherry-picks a few of Alex's provenance-related fixes which have been PR'd upstream.